home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / dev / amos / apme14.lzh / Install_AMOSMultiEnv < prev    next >
Text File  |  1992-02-27  |  5KB  |  197 lines

  1. (transcript "Installing AMOS Loader...")
  2.  
  3. (message "AMOSPro Multi-Envoironment Loader System V1.2\n\nBy Paul Hickman (ph@doc.ic.ac.uk)\n\n\nThis script will patch AMOSPro V1.12 or V2.00, and install the loader programs on your AMOSPro disk/directory\n\nReqtools library is required, and this will be copied to LIBS: if the version supplied here is newer than your current version")
  4. (welcome)
  5.  
  6.  
  7.  
  8. ;get the users AMOSPro directory.
  9.  
  10. (set #AMOSPro
  11.     (askdir
  12.     (prompt "Please select your AMOSPro_System: disk/directory.") 
  13.     (help @ask-dirhelp)
  14.     (default "AMOSPro_System:")
  15.     (newpath)
  16.     )
  17. )
  18.  
  19. (set @default-dest #AMOSPro)
  20. (complete 5)
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. ; Now detect if the AMOSPro directory is infact the root directory of
  29. ; volume AMOSPro_System.
  30.  
  31. (set AMOSdisk (= (getassign (getdevice #AMOSPro) "d") "AMOSPro_System:"))
  32.  
  33.  
  34.  
  35.  
  36.  
  37. ;Now copy reqtools library to LIBS: if necessary
  38.  
  39. (copylib
  40.     (help @copylib-help)
  41.     (prompt "Installing ReqTools.Library...")
  42.     (source "Reqtools.library")
  43.     (dest "libs:")
  44.     (confirm)
  45.     (noposition)
  46. )
  47.  
  48. (complete 15)
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. ;Now check that there is a copy of AMOSPro in the AMOS
  57. ;directory.
  58.  
  59.  
  60. (If (= (exists (tackon #AMOSPro "AMOSPro")) 0)
  61.    (abort "The file AMOSPro appears to be missing from the AMOS directory you selected!\n\nPlease try again with the correct directory.")
  62. )
  63.  
  64. (complete 20)
  65.  
  66. ;Now patch it. An already patched copy can safely be re-patched.
  67.  
  68. (working "Patching File AMOSPro")
  69. (run (cat "PatchAMOSPro " (tackon #AMOSPro "AMOSPro")))
  70.  
  71.  
  72. (complete 30)
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80. ;Now copy the program files accross
  81.  
  82. (copyfiles
  83.     (help @copyfiles-help)
  84.     (prompt "Installing AMOS Loader")
  85.     (source "GetAMOSProEnv")
  86.     (noposition)
  87.     (dest #AMOSPro)
  88. )
  89.  
  90. (complete 40)
  91.  
  92. (copyfiles
  93.     (help @copyfiles-help)
  94.     (prompt "Installing New AMOSPro Icon")
  95.     (source "AmosIcon")
  96.     (newname "Amos.info")
  97.     (noposition)
  98.     (dest #AMOSPro)
  99. )
  100.  
  101. (complete 50)
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. ; Now create the config's directory & copy the default config
  110.  
  111. (makedir (tackon #AMOSPro "APSystem/Interpreter_Configs"))
  112.  
  113. (copyfiles
  114.     (prompt "Copying Default Configuration")
  115.     (help    @copyfiles-help)
  116.     (source "s:AMOSPro_Interpreter_Config")
  117.     (dest    (tackon #AMOSPro "APSystem/Interpreter_Configs"))
  118.     (newname "Default.Config")
  119. )
  120.  
  121.  
  122. (complete 60)
  123.  
  124.  
  125.  
  126.  
  127.  
  128. ;Now get the users extra commands for the script file.
  129.  
  130. (set #extracommands "")
  131. (set #command "5")
  132.  
  133. (until (= #command "")
  134.  
  135.     (set #command
  136.         (askstring
  137.             (prompt "A Script file is created by this installer to load AMOSPro. If you would like to insert extra commands into this script just before AMOSPro is run, type each one into the string gadget below, and press proceed.\n\nPress proceed with the string gadget empty when finished.")
  138.             (help (cat "Type each command into the string gadget, "
  139.                    "and then press proceed.\n\nWhen you have "
  140.                    "finished, press proceed with the string gadget empty.\n\n"
  141.                    "The commands you enter will be executed just before "
  142.                    "AMOSPro is run, and only if AMOSPro is going to be "
  143.                    "executed - If you press Cancel in the file requester,"
  144.                    "or an error occurs, your commands will NOT be run.\n\n"
  145.                    "The most likely commands you will want to insert here "
  146.                    "are to setup assigns to the directories where you keep "
  147.                    "your AMOSPro programs."))
  148.             (default "")
  149.         )
  150.     )
  151.  
  152.     (set #extracommands
  153.         (cat #extracommands "    " #command "\n")
  154.     )
  155. )
  156.  
  157. (complete 60)
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164. ; Next, create the script
  165.  
  166. (textfile
  167.     (prompt "Creating AMOSPro Loader Script")
  168.     (help "No Help Available")
  169.     (dest (tackon #AMOSPro "Amos"))
  170.     (append ".key prog\n.bra {\n.ket }\n")
  171.     (append "; $VER: AmosPro Loader 1.2 (10.6.94)\n;\n; By Paul Hickman (ph@doc.ic.ac.uk)\n\n\n")
  172.     (append "FailAt 11\n")
  173.     (if (= AMOSdisk 0)
  174.         (append (cat (cat "assign AMOSPro_System: \"" (expandpath #AMOSPro)) "\"\n"))
  175.     )
  176.     (append "GetAMOSProEnv AMOSPro_System:APSystem/Interpreter_Configs\n")
  177.     (append "IF NOT WARN\n    CD AMOSPro_System:\n\n")
  178.     (append #extracommands)
  179.     (append "    AMOSPro_System:AMOSPro {prog}\n    C:Delete T:AMOSPro_Interpreter_Config\nENDIF\n")
  180. )
  181.  
  182. (complete 80)
  183.  
  184.  
  185.  
  186.  
  187.  
  188. ; Finally, if on a floppy disk, user may wish startup sequence modified
  189.  
  190.  
  191. (if (= AMOSdisk 1)
  192.     (message "I notice you are installing this to a floppy disk.\n\nTo use the AMOS Envoironment selector, you must double click on the AMOSPro loader icon.\n\n\nYou should make sure that your startup-sequence loads workbench, not AMOSPro directly.")
  193. )
  194.  
  195. (complete 100)
  196. (exit "\nTo load AMOS, double click on the \"Amos\" icon, instead of the old \"AMOSPro\" icon.\n\n\n\n⌐ Paul Hickman - June 1994")
  197.